
package Network;

/**
 * Creates an UplinkOnly Message
  Copyright (C) 2009 BBC Research, Sam Davies, <Sam.Davies@bbc.co.uk>

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.


 */
public class UplinkOnlyMessage extends Message{

    private char trembleSwitch;
    private char rssi;
    /**
     * 
     * @param messageType Messaget type 0x13D
     * @param tag_id_bottom Unique ID of tag generating message
     * @param slot Slot message came in
     * @param cell Cell ID of generating message
     * @param trembleSwitch (tremble_switch_on & 1) == 'the tremble switch was recently activated'
     * @param rssi Maximum RSSI value for the tag in this cell
     */

    public UplinkOnlyMessage(char messageType, long tag_id_bottom, long slot, long cell, char trembleSwitch, char rssi) {
    super(messageType, tag_id_bottom, slot, cell);
        this.trembleSwitch = trembleSwitch;
        this.rssi = rssi;
    }

    /**
     * @return the trembleSwitch
     */
    public char getTrembleSwitch() {
        return trembleSwitch;
    }

    /**
     * @return the rssi
     */
    public char getRssi() {
        return rssi;
    }

    @Override
    public String toString(){
        return("Tag Id; "+ this.getTag_id_bottom()+", slot; "+ this.getSlot()+", cell; "+ this.getCell()+" " +
                ", Tremble switch; "+ this.getTrembleSwitch()+", RSSI; "+this.getRssi());
    }

}
